package elitech.vietnam.weatherfashion.service.unittest;

import java.io.IOException;
import java.util.ArrayList;

import junit.framework.TestCase;

import org.junit.Test;

import elitech.vietnam.weatherfashion.dto.PostDTO;
import elitech.vietnam.weatherfashion.service.PHPSoapServiceCaller;

public class TestCasePHPServiceCallerNew extends TestCase {

	PHPSoapServiceCaller service = new PHPSoapServiceCaller();

	@Test(timeout = 5000)
	public void tesgetTestUTF8() {

		// String result = service.getTestUTF8();
		// assertTrue(result.length() > 5);
	}

	@Test(timeout = 5000)
	public void testGetFashionDayLike() {

		// String result = service.getTestUTF8();
		// assertTrue(result.length() >5);

		// ArrayList<PostDTO> result = service.getFashionDayLike(0, "VN",
		// 9);
		//
		// // MyClass is tested
		// assertTrue(result.size() > 5);
	}

	@Test(timeout = 5000)
	public void testgetFashionMemberLike() {

		// MyClass is tested
		ArrayList<PostDTO> result;
		// result = service.getFashionMemberLike(9);
		// assertTrue(result.size() > 5);

		// result = service.getFashionMemberLike(64, 31);
	}

	@Test(timeout = 5000)
	public void testgetFashionAllMemberDayLike() {

		// MyClass is tested
		// ArrayList<PostDTO> result = service.getFashionAllMemberDayLike(0,
		// 31);
		// assertTrue(result.size() > 0);
	}

	@Test(timeout = 5000)
	public void testgetFashionDayFriendLike() {

		// MyClass is tested
		// ArrayList<PostDTO> result = service.getFashionDayFriendLike(9, 0);
		// assertTrue(result.size() > 5);
	}

	@Test(timeout = 5000)
	public void testGetMyFashionLike() {

		// MyClass is tested
		// ArrayList<PostDTO> result = service.getMyFashionLike(9);
		// assertTrue(result.size() > 3);
	}

	@Test(timeout = 5000)
	public void testgetFashionAllMemberDayLikeCountry() {

		// MyClass is tested
		ArrayList<PostDTO> result;
//		try {
//			result = service.getFashionAllMemberDayLikeCountry(
//					0, 31, "VN");
//			
//			assertTrue(result.size() > 0);
//			
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}catch (Exception e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}	
	}

	@Test(timeout = 5000)
	public void testgetFashionDayFriendLikeCountry() {

		// MyClass is tested
		// ArrayList<PostDTO> result = service.getFashionDayFriendLikeCountry(9,
		// 0,"KR");
		// assertTrue(result.size() > 5);
	}

	@Test(timeout = 5000)
	public void testCreateMemberCountry() {

		// MyClass is tested

		// assertTrue(service.createNewMemberCountry("asasasfffffff", "123", "",
		// "", "Met", "VN") > 0);

	}
	
	@Test(timeout = 5000)
	public void testgetPostLikeMember() {

		// MyClass is tested
		ArrayList<PostDTO> result;
		try {
			result = service.getPostLikeMember(111);
			
			assertTrue(result.size() > 0);
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
	}
}
